package reader.task;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import reader.service.BookService;

@Component
public class ComputeTask {
    @Autowired
    private BookService bookService;

    @Scheduled(cron = "0 * * * * ?")
    public void updateScore() {
        System.out.println("定时任务");
        bookService.updateScore();
    }
}
